package com.atguigu.gmall.item.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author: atguigu
 * @create: 2023-06-14 11:48
 */
@Service
public class TestAsyncService {

    /**
     * 调用其他业务方法,单个简单异步任务
     *
     * @return
     */
    @Async("customAsyncThreadPool")
    public String async() {
        System.out.println(Thread.currentThread().getName() + "\t异步方法执行了");
        return "a";
    }
}
